<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="/WEB-INF/tld/components.tld" prefix="up"%>
<%@taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="pp" uri="http://java.sun.com/jsp/jstl/fmt"%>
<jsp:useBean id="agora" class="java.util.Date" />
<%@taglib tagdir="/WEB-INF/tags" prefix="p"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.ArrayList"%>
<%@page import="edu.up.beans.RelatoriosBean"%>

<html>
<jsp:include page="/Autorizacao.jsp" flush="false" />
<jsp:include page="header.jsp">
	<jsp:param name="function" value="Lista de Sonhos (Cadastro)" />
</jsp:include>
<jsp:useBean id="listaRelatoriosBean" scope="session"
	class="edu.up.beans.RelatoriosBean" />

<body>
<!-- begin #container -->
<div id="container"><!-- begin #header -->
<div id="header">
<div class="headerBackground"></div>
<div id="navcontainer">
<ul id="navlist">
	<li><a href="index.jsp"><up:label property="menu.home" /></a></li>
	<li><a href="Sonhos.jsp"><up:label property="menu.sonhos" /></a></li>
	<li><a
		href="<%=request.getContextPath()%>/RelatoriosServlet?acao=RelDepoimentos"><up:label
		property="menu.depoimentos" /></a></li>
	<li><a href="Login.jsp"><up:label property="menu.login" /></a></li>
	<li><a href="Sobre.jsp"><up:label property="menu.sobre" /></a></li>
	<li><up:countryOption country="Brasil" locale="pt_BR" /></li>
	<li><up:countryOption country="USA" locale="en_US" /></li>
	<li><up:countryOption country="Espanha" locale="es_ES" /></li>
	<li><a
		href="<%=request.getContextPath()%>/ControleServlet?funcao=Start"><img
		src="images/logout.png" alt="Logout" /></a></li>
</ul>
</div>
</div>
<!-- end #header --> <!-- begin #mainContent -->
<div id="mainContent">
<div class="t">
<div class="b">
<div class="l">
<div class="r">
<div class="bl">
<div class="br">
<div class="tl">
<div class="tr">
<form id="frmRelatorio" name="frmRelatorio" method="post"><script>
            function validar(paramAcao)
			{
			
            	document.frmRelatorio.action="<%=request.getContextPath()%>/RelatoriosServlet?acao=" + paramAcao;
				document.frmRelatorio.submit();

			}
            </script> <br />
<h1><up:label property="sonho.relatorioP" /></h1>
<table>

	<tr>
		<up:label property="texto.l89" />
		<td><input type="text" name="dtIni" size="15" maxlength="10"
			onkeypress="return textPick(this, event)" /></td>
	</tr>

	<tr>
		<up:label property="texto.l90" />
		<td><input type="text" name="dtFim" size="15" maxlength="10"
			onkeypress="return textPick(this, event)" /></td>
	</tr>

	<tr>
		<td colspan="2"><input type="button" name="btnData"
			value="<up:label property="botao.filtrar" />"
			onclick="javascript:validar('RelSonhosFiltro')" /></td>
	</tr>

</table>
<table border="1">
	<tr>

		<th><up:label property="sonho.lugar" /></th>
		<th><up:label property="sonho.tipo" /></th>
		<th><up:label property="sonho.desc" /></th>
		<th>Email</th>
		<th><up:label property="sonho.data" /></th>



	</tr>

	<%  
            		ArrayList<RelatoriosBean> list = (ArrayList<RelatoriosBean>) request.getAttribute("listaRelatoriosBean");
            		
            		
            		for (int i = 0; i < list.size(); i++) { %>
	<TR>

		<TD><%=list.get(i).getSonhoPersonalizado().getLugar() %></TD>

		<TD><%=list.get(i).getSonhoPersonalizado().getTipo() %></TD>

		<TD><%=list.get(i).getSonhoPersonalizado().getDescricao() %></TD>

		<TD><%=list.get(i).getSonhoPersonalizado().getEmail() %></TD>

		<TD><%=list.get(i).getSonhoPersonalizado().getData() %></TD>




	</TR>
	<%  } %>

</table>
</form>

<br />
<p><input type="button" name="btnVoltar"
	value="<up:label property="botao.voltar" />"
	onclick="javascript:history.back(-1)" /></p>

</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- end #mainContent --> <!-- begin #footer -->
<div id="footer"><br />
<br />

&nbsp; &nbsp; <strong><pp:formatDate value="${agora}"
	dateStyle="full" /></strong> &nbsp; &nbsp; || &nbsp; &nbsp; <up:label
	property="rodape.texto" /></div>
<!-- end #footer --></div>
<!-- end #container -->
</body>
</html>
